import request from '@/utils/request'

export function findAll(data) {
  return request({
    url: '/product/findAll',
    method: 'post',
    data
  })
}

export function deleteproduct(id) {
  return request({
    url: '/product/deletebyId',
    method: 'get',
    params:{id:id}
  })
}

export function addproduct(editproduct) {
  return request({
    url: '/product/addproduct',
    method: 'post',
    data: editproduct
  })
}

export function updateproduct(editproduct) {
  return request({
    url: '/product/updateproduct',
    method: 'post',
    data: editproduct
  })
}

export function uploadproduct(data) {
  return request({
    url: '/product/uploadproduct',
    method: 'post',
    data
  })
}
